//
//  XrDataParse.h
//  TasteEnjoy
//
//  Created by XuRui on 16/4/19.
//  Copyright © 2016年 XuRui. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSUInteger, ResposeStyle) {
    JSON,
    XML,
    Data,
};

typedef NS_ENUM(NSUInteger, RequestStyle) {
    RequestJSON,
    RequestString,
    RequestDefault
};
@interface XrDataParse : NSObject




+ (void)GETWithURL:(NSString *)urlStr par:(NSDictionary *)dic success:(void(^)(id responseObject))responseObj filed:(void(^)(NSError *error))error;

+ (void)POSTWithURL:(NSString *)urlStr par:(NSDictionary *)dic success:(void(^)(id responseObject))response filed:(void(^)(NSError *error))err;


#if 0
+ (void)getUrl:(NSString *)url
          body:(id)body
      response:(ResposeStyle)style
requestHeadFile:(NSDictionary *)handFile
       success:(void (^)(NSURLSessionDataTask *task, id resposeObject))success
       failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;

+ (void)postUrlString:(NSString *)url
                 body:(id)body
             response:(ResposeStyle)style
            bodyStyle:(RequestStyle)bodyStyle
      requestHeadFile:(NSDictionary *)headFile
              success:(void (^)(NSURLSessionDataTask *task, id responseObject))success failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;

#endif

@end
